package novel.front.novellist.service.serviceImpl;

import novel.common.constant.IConstInfo;
import novel.front.novellist.entity.LiebaoApp;
import novel.front.novellist.service.AppAsyncService;
import novel.front.novellist.service.LiebaoAppService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 888 on 2017/10/20.
 */
@Service("AppAsyncService")
public class AppAsyncServiceImpl implements AppAsyncService {
    @Resource
    private LiebaoAppService liebaoAppService;

    @Override
    @Async
    public void setHomeTypeRedis() {
        System.out.println("1");
//        //热门推荐8
//        LiebaoApp rmtj = new LiebaoApp();
//        rmtj.setHomeType(1);
//        List<LiebaoApp> rmtjList = liebaoAppService.searchApp(rmtj, IConstInfo.HOME_TYPE_RMTJ);
//        //精挑细选8
//        LiebaoApp jtxx = new LiebaoApp();
//        jtxx.setHomeType(2);
//        List<LiebaoApp> jtxxList = liebaoAppService.searchApp(jtxx, IConstInfo.HOME_TYPE_JTXX);
//        //实用工具16
//        LiebaoApp sygj = new LiebaoApp();
//        sygj.setHomeType(4);
//        List<LiebaoApp> sygjList = liebaoAppService.searchApp(sygj, IConstInfo.HOME_TYPE_SYGJ);
//        //电商购物16
//        LiebaoApp dsgw = new LiebaoApp();
//        dsgw.setHomeType(5);
//        List<LiebaoApp> dsgwList = liebaoAppService.searchApp(dsgw, IConstInfo.HOME_TYPE_DSGW);
//        //旅游出行16
//        LiebaoApp lycx = new LiebaoApp();
//        lycx.setHomeType(6);
//        List<LiebaoApp> lycxList = liebaoAppService.searchApp(lycx, IConstInfo.HOME_TYPE_LYCX);
//        //居家生活16
//        LiebaoApp jjsh = new LiebaoApp();
//        jjsh.setHomeType(7);
//        List<LiebaoApp> jjshList = liebaoAppService.searchApp(jjsh, IConstInfo.HOME_TYPE_JJSH);
//        //社交娱乐16
//        LiebaoApp sjcx = new LiebaoApp();
//        sjcx.setHomeType(8);
//        List<LiebaoApp> sjcxList = liebaoAppService.searchApp(sjcx, IConstInfo.HOME_TYPE_SJCX);
    }
}
